<template>
	<view>
		<view class="pageView">
			<view class="itemView" v-for="(item,index) in infoList" @click="itemClick(index)">
				<image :src="item.icon" style="width: 60rpx;height: 60rpx;"></image>
				<text class="title">{{item.title}}</text>
				<image src="../../static/right.png" style="width: 32rpx;height: 32rpx;"></image>
			</view>
			<suspended :jsdm="jsdm"></suspended>
		</view>
	</view>
</template>

<script>
	export default {
		
		data() {
			return {
				infoList: [{
						icon: '/static/service_1.png',
						title: '计划查询'
					},
					{
						icon: '/static/service_2.png',
						title: '用水计划审批表'
					},
					{
						icon: '/static/service_3.png',
						title: '批准调整用水计划通知书'
					},
					{
						icon: '/static/service_4.png',
						title: '超定额(计划)用水通知书'
					},
					{
						icon: '/static/service_5.png',
						title: '用水定额核算表'
					},
					{
						icon: '/static/service_6.png',
						title: '超定额(计划)用水核定通知书'
					},
					{
						icon: '/static/service_7.png',
						title: '企业信息'
					},
					{
						icon: '/static/service_8.png',
						title: '下载'
					}
				],
				
				jsdm:uni.getStorageSync('username'),
			}
		},
		
		onShow() {
			this.jsdm = uni.getStorageSync('username')
		},
		
		
		methods: {
			itemClick(index) {
				switch (index) {
					case 0:
						uni.navigateTo({
							url: '/pages/Services/ProgrammeEnquiries/ProgrammeEnquiries'
						})
						break;
					case 1:
						uni.navigateTo({
							url: '/pages/Services/WaterPlanApproval/WaterPlanApproval'
						})
						break;
					case 2:
						uni.navigateTo({
							url: '/pages/Services/WaterScheme/WaterScheme'
						})
						break;
					case 3:
						uni.navigateTo({
							url: '/pages/Services/WaterDemandNote/WaterDemandNote'
						})
						break;
					case 4:
						uni.navigateTo({
							url: 'WaterQuota/WaterQuota'
						})
						break;
					case 5:
						uni.navigateTo({
							url: 'WaterApprovedDemandNote/WaterApprovedDemandNote'
						})
						break;
					case 6:
						uni.navigateTo({
							url: 'EnterpriseInformation/EnterpriseInformation'
						})
						break;
					case 7:
						uni.navigateTo({
							url: '/pages/Services/Download/Download'
						})
						break;
				}
			}
		}
	}
</script>

<style>
	page {
		width: 100%;
		height: 100%;

		background-color: #F4F4F4;
	}

	.pageView {
		padding: 0 24rpx 0 24rpx;
	}

	.itemView {
		height: 110rpx;
		background: #FFFFFF;
		border-radius: 16rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		padding-left: 24rpx;
		padding-right: 24rpx;
		margin-top: 24rpx;
	}

	.title {
		font-size: 34rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #333333;
		line-height: 48rpx;
		margin-left: 30rpx;
		flex: 1;
	}
</style>
